package com.koron.css2.clientCenter.Enum;


public enum UserInfoExportEnum {
	status("用户状态", "IFNULL(a.status,'') status"),
	ctm_no("客户编号", "IFNULL(a.ctm_no,'') ctm_no"),
	account_no("账户编号", "IFNULL(a.account_no,'') account_no"),
	user_no("用户编号", "IFNULL(a.user_no,'') user_no"),
	book_no("册本号", "IFNULL(a.book_no,'')  book_no"),
	sort_no("排序号", "IFNULL(a.sort_no,'')  sort_no"),
	ctm_name("客户名称", "IFNULL(b.ctm_name,'') ctm_name"),
	ctm_addr("客户地址","IFNULL(b.ctm_addr,'') ctm_addr"),
	client_addr("客户结构地址","IFNULL(b.client_addr,'') client_addr"),
	client_addr_detail("客户单元地址","IFNULL(b.client_addr_detail,'') client_addr_detail"),
	ctm_type("客户类型","IFNULL(b.ctm_type,'') ctm_type"),
	cert_type("证件类型","IFNULL(b.cert_type,'') cert_type"),
	cert_no("证件号码","IFNULL(b.cert_no,'') cert_no"),
	credit_level("信用等级","IFNULL(b.credit_level,'') credit_level"),
	link_tel("联系电话","IFNULL(b.link_tel,'') link_tel"),
	fax_number("传真号码","IFNULL(b.fax_number,'') fax_number"),
	mobile("手机号码","IFNULL(b.mobile,'') mobile"),
	contract_no("合同编号","IFNULL(a.contract_no,'') contract_no"),
	contract_addr("合同地址","IFNULL(a.contract_addr,'') contract_addr"),
	contract_date("合同签订日期","IFNULL(a.contract_date,'') contract_date"),
	use_time_limit("用水期限","IFNULL(a.use_time_limit,'') use_time_limit"),
	admin_area("行政区域","IFNULL(a.admin_area,'') admin_area"),
	business_abode("营业所","IFNULL(a.business_abode,'') business_abode"),
	business_area("营业区域","IFNULL(a.business_area,'') business_area"),
	trade_classify("行业分类","IFNULL(a.trade_classify,'') trade_classify"),
	stop_water_link_man("通知人","IFNULL(a.stop_water_link_man,'') stop_water_link_man"),
	stop_water_link_mobile("通知人手机号","IFNULL(a.stop_water_link_mobile,'') stop_water_link_mobile"),
	user_group_no("用户组编号","IFNULL(a.user_group_no,'') user_group_no"),
	meter_reading_cycle("抄表周期","IFNULL(a.meter_reading_cycle,'') meter_reading_cycle"),
	quota_water("定额水量","IFNULL(a.quota_water,'') quota_water"),
	comments("备注","IFNULL(a.comments,'') comments"),
	concentrator_no("集中器","IFNULL(a.concentrator_no,'') concentrator_no"),
	real_estate_no("不动产单元号","IFNULL(a.real_estate_no,'') real_estate_no"),
	use_water_type("用水类型","IFNULL(a.use_water_type,'') use_water_type"),
	account_type("账户类型","IFNULL(c.account_type,'') account_type"),
	pay_way("缴费方式","IFNULL(c.pay_way,'') pay_way"),
	open_account_bank("开户银行","IFNULL(c.open_account_bank,'') open_account_bank"),
	open_account_name("开户名称","IFNULL(c.open_account_name,'') open_account_name"),
	bank_account("银行账号","IFNULL(c.bank_account,'') bank_account"),
	entrust_no("托号","IFNULL(c.entrust_no,'') entrust_no"),
	entrust_contract("托收合同号","IFNULL(c.entrust_contract,'') entrust_contract"),
	deliver_way("投递方式","IFNULL(c.deliver_way,'') deliver_way"),
	deliver_addr("投递地址","IFNULL(c.deliver_addr,'') deliver_addr"),
	email_addr("邮箱地址","IFNULL(c.email_addr,'') email_addr"),
	bank_sn("开户行号","IFNULL(c.bank_sn,'') bank_sn"),
	out_no("出盘编号","IFNULL(c.out_no,'') out_no"),
	invoice_type("发票类型","IFNULL(c.invoice_type,'') invoice_type"), 
	invoice_title("单位名称","IFNULL(c.invoice_title,'') invoice_title"), 
	invoice_tax("纳税人识别号","IFNULL(c.invoice_tax,'') invoice_tax"),
	invoice_addr("联系地址","IFNULL(c.invoice_addr,'') invoice_addr"),
	invoice_link("座机号码","IFNULL(c.invoice_link,'') invoice_link"), 
	invoice_bank("开票-开户银行","IFNULL(c.invoice_bank,'') invoice_bank"), 
	invoice_account("开票-银行账户","IFNULL(c.invoice_account,'') invoice_account"),
	vat_flag("增值税标记","IFNULL(c.vat_flag,'') vat_flag"),
	meter_type("水表类型","IFNULL(d.meter_type,'') meter_type"),
	meter_no("水表编号","IFNULL(a.meter_no,'') meter_no"),
	setup_meter_addr("装表地址","IFNULL(a.setup_meter_addr,'') setup_meter_addr"), 
	client_contract_addr("装表结构地址","IFNULL(a.client_contract_addr,'') client_contract_addr"), 
	client_contract_addr_detail("装表单元地址","IFNULL(a.client_contract_addr_detail,'') client_contract_addr_detail"), 
	setup_meter_location("装表位置","IFNULL(a.setup_meter_location,'') setup_meter_location"),
	father_meter_no("总表编号","IFNULL(a.father_meter_no,'') father_meter_no"), 
	virtual_design_formulas("虚拟计算公式","IFNULL(a.virtual_design_formulas,'') virtual_design_formulas"),
	meter_use("水表用途","IFNULL(a.meter_use,'') meter_use"), 
	use_water_object("用水对象","IFNULL(a.use_water_object,'') use_water_object"),
	setup_meter_date("装表日期","IFNULL(a.setup_meter_date,'') setup_meter_date"), 
	split_meter_date("拆表日期","IFNULL(a.split_meter_date,'') split_meter_date"),
	split_meter_way("拆表类型","IFNULL(a.split_meter_way,'') split_meter_way"),
	meter_bore("水表口径","IFNULL(d.meter_bore,'') meter_bore"),
	meter_factory("水表厂家","IFNULL(d.meter_factory,'') meter_factory"),
	meter_factory_no("水表表身码","IFNULL(d.factory_no,'') factory_no"),
	imei("imei","IFNULL(d.imei,'') imei"),
	open_date("立户日期","IFNULL(a.open_date,'') open_date"),
	meter_sensor("水表传感器","IFNULL(d.meter_sensor,'') meter_sensor"),
	transmittal_model("传输方式","IFNULL(d.transmittal_model,'') transmittal_model"),
	meter_model("水表型号","IFNULL(d.meter_model,'') meter_model"),
	ladder_person_num("用水人口","IFNULL(a.ladder_person_num,'') ladder_person_num"),
	change_meter_date("换表日期","IFNULL(a.change_meter_date,'') change_meter_date"),
	meter_site("表位","IFNULL(a.meter_site,'') meter_site"),
	meter_bjwz("表井位置","IFNULL(a.meter_bjwz,'') meter_bjwz"),
	meter_bjxs("表井形式","IFNULL(a.meter_bjxs,'') meter_bjxs"),
	pref_strategy_id("优惠策略","IFNULL(a.pref_strategy_id,'') pref_strategy_id"),
	pref_cert_no("优惠证件号码","IFNULL(a.pref_cert_no,'') pref_cert_no"),
	pref_begin_date("优惠策略开始日期","IFNULL(a.pref_begin_date,'') pref_begin_date"),
	pref_end_date("优惠策略结束日期","IFNULL(a.pref_end_date,'') pref_end_date"),
	last_reading_date("最后抄表日期","IFNULL(a.last_reading_date,'') last_reading_date"),
	meter_reading_staff_name("抄表员","IFNULL(e.meter_reading_staff_name,'') meter_reading_staff_name"),
	miicno("IC卡号","IFNULL(a.MIICNO,'') MIICNO"),
	miicsl("累计购水量","IFNULL(a.MIICSL,'') MIICSL"),
	last_reading_num("最后抄码","IFNULL(a.last_reading_num,'') last_reading_num"),
	use_water_type_1("1级用水类型","IFNULL(g.water_type_name,'') water_type_name");
	private String excelName;
    private String fieldName;

    // 构造方法
    private UserInfoExportEnum(String excelName, String fieldName) {
        this.excelName = excelName;
        this.fieldName = fieldName;
    }

    /**
     * 根据前端选中字段获取枚举名
     * @param index
     * @return
     */
    public static String getName(String index) {
        for (UserInfoExportEnum c : UserInfoExportEnum.values()) {
        	if(c.name().equals(index)) {
        		return c.name();
        	}
        }
        return null;
    }
    
    /**
     * 根据枚举名获取需要查询的字段名
     * @param name
     * @return
     */
    public static String fieldName(String name) {
        for (UserInfoExportEnum c : UserInfoExportEnum.values()) {
        	if(c.name().equals(name)) {
        		return c.fieldName;
        	}
        }
        return null;
    }
    
    /**
     * 根据枚举名获取excel表头名
     * @param name
     * @return
     */
    public static String excelName(String name) {
        for (UserInfoExportEnum c : UserInfoExportEnum.values()) {
        	if(c.name().equals(name)) {
        		return c.excelName;
        	}
        }
        return null;
    }


	public String getExcelName() {
		return excelName;
	}

	public void setExcelName(String excelName) {
		this.excelName = excelName;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

}
